#include "CDoor.h"
#include "Wrappers\CSGD_TextureManager.h"
#include "Game Objects\CCamera.h"



CDoor::CDoor()
{
	SetWidth(64);
	SetHeight(64);
}
void CDoor::open()
{
	isopen = true;
}


void CDoor::rendertiles()
{
	if(isopen && imageid != -1)
	{
		RECT imagerect;
		imagerect.top = 0;
		imagerect.left = 0;
		imagerect.right = 64;
		imagerect.bottom = 64;
		CSGD_TextureManager::GetInstance()->Draw(imageid,(int)GetPosX() - CCamera::GetInstance()->GetOffsetX(),(int)GetPosY() - CCamera::GetInstance()->GetOffsetY(),1.0f,1.0f,&imagerect);
	}
}